/**
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package edu.yonsei.iwb.sdt.refinement;

import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import java.util.Vector;
import edu.yonsei.iwb.sdt.ontology.PropertyArc;

/**
 *
 * @author JDK
 */
public class ExpandingHistory {

    private Vector<PropertyArc> propertySet;
    private Vector<String> quantifier;
    private Vector<String> instanceSet;

    public ExpandingHistory() {
        this.propertySet = new Vector<PropertyArc>();
        this.quantifier = new Vector<String>();
        this.instanceSet = new Vector<String>();
    }

    public ExpandingHistory(Vector<PropertyArc> p, Vector<String> q) {
        this.propertySet = p;
        this.quantifier = q;
    }

    public void add(PropertyArc property, String quantifier) {
        this.propertySet.add(property);
        this.quantifier.add(quantifier);
    }

    public boolean contains(String r) {
        return this.instanceSet.contains(r);
    }

    public void addInstance(String r) {
        if (!this.instanceSet.contains(r)) {
            this.instanceSet.add(r);

        }

    }

    public Vector<String> getInstanceSet() {
        return this.instanceSet;
    }

    public Vector<PropertyArc> getPropertySet() {
        return this.propertySet;
    }

    public Vector<String> getQuantifierSet() {
        return this.quantifier;
    }

    public void updateExpandingHistory(ExpandingHistory eh) {

        for (int i = 0; i < eh.getPropertySet().size(); i++) {
            this.propertySet.add(eh.getPropertySet().get(i));
        }

        for (int i = 0; i < eh.getQuantifierSet().size(); i++) {
            this.quantifier.add(eh.getQuantifierSet().get(i));
        }

    }

    public int getExpandingHistorySize() {
        return this.propertySet.size();
    }

    public boolean isEmpty() {
        return this.propertySet.isEmpty();
    }
}
